package com.jiepu.daily.corejava.advanceed.part1.day0713;
/**
 * @Description:
 * @author: xinjie.txt
 * @date: 2020/7/13  14:57
 */

/**
 * @description:
 * @author: xinjie.txt
 * @date: 2020/7/13 15:08
 */
public class ShapeTest {

	public static void main(String[] args) {
		Shape s1 = new Circle(5);
		Shape s2 = new Circle(6);
		Shape s5 = new Circle(9);


		print(s1,s2,s5);
	}


	// Shape...shapes  生命为数组
	public static void print(Shape... shapes) {
		for (int i = 0; i < shapes.length; i++) {
			Shape s = shapes[i];
			System.out.println("图形名称：" + s.getName()
					+ ", 属性：" + s.getField()
					+ ", 周长：" + s.getGirth()
					+ ", 面积：" + s.getArea());
		}
	}
}
